package com.leo.oplayer.model;

import android.database.Cursor;

public class MonthStat {
	public static final String TABLE_NAME = "con_month_stat";
	
	public static final String _ID = "_id";
	public static final String _PERSON_ID = "person_id";
	public static final String _IN_MONTH = "in_month";
	public static final String _IN_CALL_NUM = "in_call_num";
	public static final String _OUT_CALL_NUM = "out_call_num";
	public static final String _IN_MSG_NUM = "in_msg_num";
	public static final String _OUT_MSG_NUM = "out_msg_num";
	public static final String _POINT = "point";
	public static final String _REMARK = "remark";
	
	private Integer id;
	
	private String phoneId;
	
	private String month;
	
	private Integer inCallNum = 0;
	
	private Integer outCallNum = 0;
	
	private Integer inMsgNum = 0;
	
	private Integer outMsgNum = 0;
	
	private Integer point = 0;
	
	private String remark ;
	
	public MonthStat(){
		
	}

	public MonthStat(String phoneId, String month) {		
		this.phoneId = phoneId;
		this.month = month;
	}
	
	public MonthStat(Cursor cursor){		
		this.id = cursor.getInt(cursor.getColumnIndex(_ID));
		this.phoneId = cursor.getString(cursor.getColumnIndex(_PERSON_ID));
		this.month = cursor.getString(cursor.getColumnIndex(_IN_MONTH));
		this.inCallNum = cursor.getInt(cursor.getColumnIndex(_IN_CALL_NUM));
		this.outCallNum = cursor.getInt(cursor.getColumnIndex(_OUT_CALL_NUM));
		this.inMsgNum = cursor.getInt(cursor.getColumnIndex(_IN_MSG_NUM));
		this.outMsgNum = cursor.getInt(cursor.getColumnIndex(_OUT_MSG_NUM));
		this.point = cursor.getInt(cursor.getColumnIndex(_POINT));
		this.remark = cursor.getString(cursor.getColumnIndex(_REMARK));
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getPhoneId() {
		return phoneId;
	}

	public void setPhoneId(String phoneId) {
		this.phoneId = phoneId;
	}

	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

	public Integer getInCallNum() {
		return inCallNum;
	}

	public void setInCallNum(Integer inCallNum) {
		this.inCallNum = inCallNum;
	}

	public Integer getOutCallNum() {
		return outCallNum;
	}

	public void setOutCallNum(Integer outCallNum) {
		this.outCallNum = outCallNum;
	}

	public Integer getInMsgNum() {
		return inMsgNum;
	}

	public void setInMsgNum(Integer inMsgNum) {
		this.inMsgNum = inMsgNum;
	}

	public Integer getOutMsgNum() {
		return outMsgNum;
	}

	public void setOutMsgNum(Integer outMsgNum) {
		this.outMsgNum = outMsgNum;
	}

	public Integer getPoint() {
		return point;
	}

	public void setPoint(Integer point) {
		this.point = point;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public String toString(){
		StringBuffer sb = new StringBuffer();
		sb.append("phoneId:").append(this.phoneId)
		.append(" month:").append(this.month)
		.append(" inCallNum:").append(this.inCallNum)
		.append(" outCallNum:").append(this.outCallNum)
		.append(" inMsgNum:").append(this.inMsgNum)
		.append(" outMsgNum:").append(this.outMsgNum)
		.append(" point:").append(this.point)
		.append(" remark:").append(this.remark);
		return sb.toString();
	}
}
